]> dgit.raspbian.org Git - ostree.git/commit
find-remotes: Don't require write access to repo unless pulling
authorlzwind <liuzheng@uniontech.com>
Wed, 5 Aug 2026 00:59:56 +0000 (08:59 +0800)
committerlzwind <liuzheng@uniontech.com>
Wed, 5 Aug 2026 00:59:56 +0000 (08:59 +0800)
commit2a71b8f897e716abea7db82552c381463182d4d5
tree317d78b2f74d0f46c440e2821d4710da2bb2230a
parent91a712a248b921e8101a50c289352d3e6ebbfaa3
find-remotes: Don't require write access to repo unless pulling

ostree find-remotes is a read-only operation that searches for remotes
which have a given collection-ref. It should not require write access
to the repository. Only when --pull is used does the command actually
write to the repo.

Move the ostree_ensure_repo_writable() check to just before the pull
phase so that read-only find-remotes works on read-only repositories.

Closes #3585
src/ostree/ot-builtin-find-remotes.c